package com.market.dao.jpa;

import org.springframework.stereotype.Repository;

import com.market.dao.UserActivityRecordDao;
import com.market.domain.UserActivityRecord;

@Repository("userActivityRecordDao")
public class UserActivityRecordDaoJpa extends
		GenericDaoJpa<UserActivityRecord, Long> implements
		UserActivityRecordDao {
	public UserActivityRecordDaoJpa() {
		super(UserActivityRecord.class);
	}

	public void remove(UserActivityRecord userActivityRecord) {
		if (this.findById(userActivityRecord.getId()) == null) {
			log.debug(this.getClass() + " AccountRecord with id "
					+ userActivityRecord.getId()
					+ " not found, can not be deleted");
		} else {
			log.debug(this.getClass() + " AccountRecord with id "
					+ userActivityRecord.getId() + " found, will be deleted");
			super.removeById(userActivityRecord.getId());
		}
	}

}
